home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #ifndef _WEEK_OVERVIEW_
- #define _WEEK_OVERVIEW_
-
- #include <Vk/VkWindow.h>
- #include <Vk/VkScroll.h>
- #include "TimeEntry.h"
- #include "TimeGrid.h"
- #include "Utils.h"
-
- class VCal;
- class Entry;
- class TimeWeekdayEntry;
-
- class WeekOverview : public VkWindow {
- public:
- WeekOverview(VCal *owner, const char *docName);
- ~WeekOverview();
-
- const char *className();
-
- void selectWeek(int day, int month, int year);
- void updateDisplay() { selectWeek(day, month, year); }
-
- protected:
- virtual Widget setUpInterface(Widget parent);
- virtual void handleWmDeleteMessage();
- void fileMenu();
- void doQuit();
- void restrictedChanged(Boolean restricted);
- void scrollProc(Widget w, XtPointer client_data, XtPointer call_data);
- void gridCallback(TimeGridCallback *cb);
- void adjustGrid();
- void clearData();
- void addDateEntries(int day, int month, int year, int weekday);
- void addEntry(Entry *entry, int weekday);
- void entryCallback(Widget w, TimeEntryCallback *cb);
- void drawTrough(VkScrollCallback *cb);
- void annotateEntry(TimeEntry *entry, int width, int height, Pixmap pixmap);
- void highlightWeekday(int weekday);
-
- static void quit_menu(Widget w, XtPointer client_data, XtPointer call_data);
- static void restricted_menu(Widget w, XtPointer client_data,
- XtPointer call_data);
- static void grid_stub(Widget w, XtPointer client_data, XtPointer call_data);
- static void expose_check(Widget w, XtPointer client_data,
- XtPointer call_data);
- static void entry_stub(Widget w, XtPointer client_data, XtPointer call_data);
-
- VCal *owner;
- Widget form, weekLabel, headerArea, headerLabels[DAYS_IN_WEEK];
- int day, month, year;
- int lastDay, lastMonth, lastYear;
- Boolean restricted;
- VkScroll *scroll;
- TimeGrid *grid;
- int timeInterval, subdivisions, timeSlotSnap;
- int restrictStart, restrictEnd, defaultLength;
- TimeWeekdayEntry **entries;
- int numEntries, sizeEntries;
- Boolean dirty;
- GC troughGC;
- };
-
- #endif
-